<?php
/**
 * DonReY Framework 2012 :: BootStrap Initialization File
 * This file should be copied in project root ( not the "htdocs" ), and it contains all required functionality to initialize and load DonReY framework
 * - Path initialization
 * - Required constants
 * - DonReY Core inclusion
 * - Extra required files inclusion
 *
 * @author Wavetrex <wavetrex@gmail.com>
 * @link http://www.donrey.net/Documentation/Core/bootstrap.html
 * @license [GPL v3] http://www.gnu.org/licenses/gpl-3.0.html
 * @version 1.0.dev
 * @package DonReY
 */
namespace DRY;

//=== debugging the app ===//
ini_set('display_errors','stdout');
error_reporting(-1);
//error_reporting(E_ERROR | E_WARNING | E_PARSE | E_NOTICE);
//error_reporting(0); // framework handles error capturing, no need to display them on screen

//*** Set proper paths for the DonReY framework below this line ***//

// Location of external libraries, which might be needed by some modules or the application
define('LIB_PATH'	, realpath('/home/library'));

// Location where DonReY directory structure is: "core.php", the "modules" directory and everything else
define('CORE_PATH'	, realpath('/home/library/donrey2012'));

// Location where your Application directory structure is: (usually where "index.php" is, or one level above if "htdocs" ( the web root ) is inside this directory)
define('APP_PATH'	, realpath(__DIR__)); // this dir, where the app root path is ( outside htdocs )

// This helps access other libraries that may be used by DonReY ( for example - FirePHP, Smarty or GeSHi  )
set_include_path(implode(PATH_SEPARATOR, array(
	realpath(LIB_PATH), // libraries path ( usually contains other 3rd party libraries which need to be loaded by DonReY )
	realpath(APP_PATH. '/library'), // extra libraries used just for this application ( might not exist )
	get_include_path(),
)));

// if absent, it defaults to english anyway.
define('WET_MESSAGE_LANGUAGE', "english");

//*** Do not modify anything below this line, this section is part of the framework ***//

// include DonReY Core
require_once(CORE_PATH. '/core.php'); // the DonReY Core. Everything starts here

// load configuration and initialize core
core::_init(APP_PATH. '/project-config.xml'); // default configuration should be in the same path as this bootstrap file